package com.gouzheng.service.impl;

import com.gouzheng.dao.UserDao;
import com.gouzheng.entity.User;
import com.gouzheng.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("UserService")
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User login(String username, String password) {
        return userDao.login(username,password);
    }

    @Override
    public List<User> getAll(String names,Integer type) {
        return userDao.getAll(names,type);
    }


    @Override
    public Integer getAllName(String username) {
        return userDao.getAllName(username);
    }

    @Override
    public Integer getStuNum(String stuNum) {
        return userDao.getStuNum(stuNum);
    }

    @Override
    public String findStuNum(String stuNum) {
        return userDao.findStuNum(stuNum);
    }

    @Override
    public void addUser(User user) {
        userDao.addUser(user);
    }

    @Override
    public void addUsers(User user) {
        userDao.addUsers(user);
    }

    @Override
    public User getUserId(Integer id) {
        return userDao.getUserId(id);
    }

    @Override
    public void updateUser(User user) {
        userDao.updateUser(user);
    }

    @Override
    public void deleteUser(Integer id) {
        userDao.deleteUser(id);
    }

    @Override
    public void delete(List delList) {
        userDao.delete(delList);
    }


}
